package com.fac.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 角色表
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("roles")
@ApiModel(description = "角色实体类")
public class Role implements Serializable {

    /**
     * 角色ID
     */
    @TableId(value = "role_id", type = IdType.AUTO)
    @ApiModelProperty(value = "角色ID", example = "1")
    private Long roleId;

    /**
     * 角色编码
     */
    @ApiModelProperty(value = "角色编码", example = "ADMIN", required = true)
    private String code;

    /**
     * 角色名称
     */
    @ApiModelProperty(value = "角色名称", example = "系统管理员", required = true)
    private String name;

    /**
     * 角色描述
     */
    @ApiModelProperty(value = "角色描述", example = "系统管理员，拥有所有权限")
    private String description;

    /**
     * 状态：0禁用，1启用
     */
    @ApiModelProperty(value = "状态：1启用，0禁用", example = "1")
    private Integer status;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间", example = "2024-01-01 12:00:00")
    private LocalDateTime createdAt;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间", example = "2024-01-01 12:00:00")
    private LocalDateTime updatedAt;
} 